<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<script type="text/javascript">
			var a = [1, 2, 3, 4, 5,'acb'];
			var b = [1, 2, 3, 4, 5,'abc'];
			test(a, b)

			function test(a, b) {
				if(a.length != b.length) return false; //两个长度不同的数组不相等
				for(var i = 0; i < a.length; i++)
					if(a[i] !== b[i]) return console.log(false);
				return console.log(true);
			}
		</script>
	</body>

</html>